using System;
using System.Collections.Generic;
using System.Text;

namespace Payroll
{
    public class ChangeMemberTransaction:ChangeAffiliationTransaction
    {
        private double itsDues;
        private int itsMemberId;

        public ChangeMemberTransaction(int empid,int memberid,double dues)
            : base(empid)
        {
            itsMemberId = memberid;
            itsDues = dues;
        }

        public override void RecordMembership(Employee e)
        {
            PayrollDatabase.Default.AddUnionMember(itsMemberId, e);
        }

        public override Affiliation GetAffiliation()
        {
            return new UnionAffiliation(itsMemberId, itsDues);
        }
    }
}
